<%@ page import="pojo.ST" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2022/3/1
  Time: 11:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
    <title>Title</title>
</head>
<style>
    body{
        background-image:linear-gradient(to right, #ffc6e2, #ccb4ff);
    }

    hover {
        color: #ff7300;
    }

    h2{
        color: #6b138b;
        text-align: center;
        vertical-align:middle;
    }
    div {
        background-color: #F5FAFA;
        margin-left: auto;
        margin-right: auto;
        width: 500px;
        position: absolute;
        left: 500px;
        top: 300px;
    }

    form{
        background-color: white ;
        width: 300px;
        height: 130px;
        border-radius: 20px;
        opacity: 0.9;
        margin-left: auto;
        margin-right: auto;
        margin-top: 100px;
    }


    select{
        width: 200px;
        height: 40px;
        border: 1px solid #080a0b;
    }

    a{
        text-decoration:none;
    }
    button{
        background-color: white;
        color: #c7a9ff
    }
</style>
<body>
<button><a href="Init.jsp">上一页</a></button>

   <div> <%
        String objSemester = "";
        try {
            List<ST> stList= (List<ST>) request.getAttribute("obj_data");
            for (int i = 0; i < stList.size(); i++) {
                out.print(stList.get(i).getStudentID()+" ");
                out.print(stList.get(i).getStudentName()+" ");
                out.print(stList.get(i).getStudentDate()+" ");
                out.print(stList.get(i).getStudentNumber()+" ");
                out.print(stList.get(i).getStudentSemester()+" ");
                out.print(stList.get(i).getStudentStatus()+"</br>");

                objSemester =  stList.get(i).getStudentSemester();
                request.setAttribute("objSemester",objSemester);
            }
        }catch (Exception e){
            e.printStackTrace();
        }

    %></div>
<form style="text-align:center;vertical-align:middle;"  action="/SemesterServlet" method="get">
    <h5>请确定您要查询的学期</h5>
    <h5>Semester</h5><input name="semester" value=<%= objSemester %>>

    <input type="submit" value="提交">
</form>
</body>

</html>
